Fix url in password reset email#12078
Conversation
|
@blueorangutan package |
|
@sureshanaparti a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.22 #12078 +/- ##
============================================
+ Coverage 3.58% 17.60% +14.01%
- Complexity 0 15613 +15613
============================================
Files 445 5911 +5466
Lines 37536 529987 +492451
Branches 6905 64751 +57846
============================================
+ Hits 1346 93278 +91932
- Misses 36024 426209 +390185
- Partials 166 10500 +10334
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a regression in the password reset email URL functionality introduced in PR #11379. The URL construction was broken because the domain URL was being included twice in the email template.
Key changes:
- Consolidated URL construction logic to build the complete reset link in code rather than in the email template
- Added fallback to use ManagementServerAddresses when UserPasswordResetDomainURL is not configured
- Added trailing slash removal to ensure clean URL formatting
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
server/src/main/java/org/apache/cloudstack/user/UserPasswordResetManagerImpl.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/apache/cloudstack/user/UserPasswordResetManagerImpl.java
Outdated
Show resolved
Hide resolved
|
@blueorangutan package |
|
@blueorangutan package |
|
@sureshanaparti a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 15767 |
DaanHoogland
left a comment
There was a problem hiding this comment.
looks generally good, one question.
server/src/main/java/org/apache/cloudstack/user/UserPasswordResetManagerImpl.java
Outdated
Show resolved
Hide resolved
|
@blueorangutan test |
|
@sureshanaparti a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian Build Failed (tid-14834) |
|
@blueorangutan test |
|
@vladimirpetrov a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-14862)
|
kiranchavala
left a comment
There was a problem hiding this comment.
|
@blueorangutan package |
|
@sureshanaparti a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 15945 |
|
@blueorangutan test |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-14921)
|
| return properties; | ||
| } | ||
|
|
||
| public static boolean isHttpsEnabled() { |
There was a problem hiding this comment.
IMO, it will be better to set a variable during initialization and just return that. Updating https and other things, require restarting server anyway.
There was a problem hiding this comment.
it's already set in ServerDaemon, but not directly accessible. so checking it through server properties where the config is defined.
server/src/main/java/org/apache/cloudstack/user/UserPasswordResetManagerImpl.java
Show resolved
Hide resolved
|
@blueorangutan package |
|
@kiranchavala a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 16555 |
|
@blueorangutan package |
|
@vishesh92 a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 16559 |
kiranchavala
left a comment
There was a problem hiding this comment.
LGTM
Tested with no value in user.password.reset.mail.domain.url
Tested with value user.password.reset.mail.domain.url set to kiranchavala.in
HTTP got appened
Tested with value user.password.reset.mail.domain.url to set to a port kiranchavala.in:908
Tested with value user.password.reset.mail.domain.url set to https


Description
This PR fixes the url in password reset email. (regression from #11379)
Fixes #12050
Doc PR: apache/cloudstack-documentation#621
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?